{foreach key=k item=i from=$threads}
	
{if $i.id!=5 && ($i.id <19 or $i.id>25)}
	
	{if $i.level == 0}
		{if $k > 0}</table></div>{/if}
		<div class="contentTitleDark">
			{$i.name}
		</div>
		<div class="content">
		<table cellspacing="1" cellpadding="1" border="0" style="width:100%;background-color:;">
			<tr style="background-color:#FDECEA; height: 25px;">
				<td width="32">&nbsp;</td>
				<td class="black s11 b" width="300">Nimi</td>
				<td class="black s11 b" width="80" style="text-align:center">Vaatamisi</td>
				<td class="black s11 b" width="80" style="text-align:center">Postitusi</td>
				<td class="black s11 b" width="*" style="text-align:center">Viimane postitus</td>
				<td class="black s11 b" width="*" style="text-align:center">Viimane postitaja</td>
			</tr>
	{else}
		<tr style="background-color:{cycle values='#FFFFFF,#F3F3F3'};">
			<td> <img src="{$mediaUrl}Foorum/thread.gif"></td>
			<td> <a href="{$pageUrl}Forum/thread/{$i.id}" class="red s11 b">{$i.name}</a><br /> {$i.description} </td>
			<td class="lightGrey s10" style="text-align:center">{$i.views}</td>
			<td class="lightGrey s10" style="text-align:center">{$i.nrOfPosts}</td>
			<td class="lightGrey s10" style="text-align:center">
			{$i.lastPostTime|date_format:"%d-%m-%Y %H:%M"}<br />
			<a href="{$thread.lastTopicLink}" class="red s10 b">{$i.lastTopicHeadline|truncate:34}</a>
			</td>
			<td class="red s10 b" style="text-align:center">{$i.lastPostNickname}</td>
		</tr>
	{/if}
{/if}

{/foreach}
</table></div>
<div class="content"><a class="black b s12" href="{$pageUrl}Forum/thread/5">Vanale foorumi põhisele turule pääseb ligi siit.</a></div>
<div class="contentTitleDark">B-turu viimased kuulutused</div>
{$marketItems}